package com.qf.mapper;

import com.qf.pojo.Book;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookMapper {
    @Insert("insert into books(authorid,bookdescription,bookname,bookpicurl,categoryid) value(#{authorid},#{bookdescription},#{bookname},#{bookpicurl},#{categoryid})")
    void addBook(Book book);

    @Select("select * from books")
    List<Book> findAllBook();
}
